<extend name="Public/base"/>
<block name="head">
	 <link rel="stylesheet" type="text/css" href="__NEW_CSS__/login.css">
	
	 <script type="text/javascript" src="__STATIC__/jquery.validate.js"></script>
</block>
<block name="body">
<div class="main">
    <div class="login-main">

        <div class="login-content">
            <div class="title">
                <span class="hd">用户注册</span>
                <span class="tips">尊敬的用户，欢迎您回来！</span>
                <p class="other">已经有账号，<a href="{:U('User/login')}" rel="nofollow">立即去登录</a></p>
            </div>
            <div class="login-center">
                <div class="content-landing fl">
                    <form class="registerForm form-horizontal" action="{:U('User/register')}" method="post" id="login">
                       
                            <div class="form-group">
                                <label class="control-label col-sm-3">账号：</label>
                                 <div class="col-sm-8">
                                <input value="" class="form-control" id="account" placeholder="用户名" name="username" autocomplete="off" type="text" minlength="6" data-msg-minlength="至少输入6个字符">
                             	</div>
                            </div>
                           <div class="form-group">
                                <label class="control-label col-sm-3">密码：</label>
                                 <div class="col-sm-8">
                                <input id="password" class="form-control" placeholder="请输入密码" name="password" autocomplete="off" type="password" required data-msg-required="请输入密码" minlength="6" data-msg-minlength="至少输入6个字符">
                            	</div>
                            </div>
                           <div class="form-group">
                                <label class="control-label col-sm-3">确认密码：</label>
                                <div class="col-sm-8">
                                <input class="form-control" placeholder="确认密码" name="repassword" autocomplete="off" type="password" required equalto="#password">
                             	</div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-3">邮箱：</label>
                                <div class="col-sm-8">
                                	<input class="form-control " placeholder="请输入邮箱" name="email" autocomplete="off" type="email" required data-rule-email="true" data-msg-required="请输入email地址" data-msg-email="请输入正确的email地址"ss>
                            	</div>
                            </div>
                           <div class="form-group">
                                <label class="control-label col-sm-3">手机：</label>
                                <div class="col-sm-8">
                               		 <input class="form-control" placeholder="请填写手机" name="mobile" autocomplete="off" type="text" required data-rule-mobile="true" data-msg-required="请输入手机号" data-msg-mobile="请输入正确格式">
                             	</div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-sm-3"></label>
                                 <div class="col-sm-8">
                               		 <button class="btn btn-success ajax-post" target-form="form-horizontal" type="submit">注册</button>
                             	</div>
                            </div>
                       
                    </form>
                </div>
                <div class="login-l-img fr">
                    {:ad(5,register_right)}
                </div>
            </div>

        </div>
    </div>
</div>
<!--主体 end-->
</block>
<block name="script">
<script>

//配置错误提示的节点，默认为label，这里配置成 span （errorElement:'span'）
$.validator.setDefaults({
	errorElement:'span'
});

//配置通用的默认提示语
$.extend($.validator.messages, {
	required: '必填',
    equalTo: "请再次输入相同的值"
});
jQuery.validator.addMethod("mobile", function (value, element) {
    var mobile = /^1[3|4|5|7|8]\d{9}$/;
	return this.optional(element) || (mobile.test(value));
}, "手机格式不对");
</script>
</block>
